package lab.dimko;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.view.View.OnClickListener;

public class FirstLabActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        final EditText nameEdit = (EditText)findViewById(R.id.nameEdit);
        Button okButton = (Button)findViewById(R.id.okButton);
        okButton.setOnClickListener(new OnClickListener() {
			
			public void onClick(View v) {
				Intent i=new Intent(getApplicationContext(), HelloFirstLabActivity.class);
				i.putExtra("name", nameEdit.getText().toString());
				startActivity(i);
			}
		});
    }
}